package com.joekai.base_library;

import android.app.Application;

import com.joekai.base_library.http.HttpRetrofitRequest;
import com.joekai.base_library.http.HttpUtils;
import com.joekai.base_library.http.RetrofitClientUtil;


/**
 * author:  JoeKai
 * date: 2022/7/1 15:23
 * content：
 */
public class BaseApp extends Application {
    //全局唯一的context
    private static volatile BaseApp instance;

    public static BaseApp getInstance() {
        if (instance == null) {
            synchronized (BaseApp.class) {
                if (instance == null) {
                    instance = new BaseApp();
                }
            }
        }
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        HttpUtils.getInstance().httpRequest(HttpRetrofitRequest.getInstances());

    }
}
